package cs1;

import java.util.ArrayList;

public class StudentTest {
    public static void main(String[] args) {
        //建立集合用来存放
        ArrayList<Student> list = new ArrayList<>();
        //空参构造方法 创建Student对象
        Student stu1 = new Student();
        stu1.setMing("一号");
        stu1.setNianling(18);
        stu1.setXingbie("男");
        //打印
        list.add(stu1);

        //满参构造方法创建Student对象
        Student stu2 = new Student("一号",18,"男");
        Student stu3 = new Student("二号",19,"女");
        Student stu4 = new Student("三号",20,"男");
        Student stu5 = new Student("四号",21,"女");


    }
}
